{literal}
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
{/literal}
<input id="textbox1" type=text/>
<input type="button" onclick="ajaxCall();" value="Call Ajax"/>
<input type="hidden" id="hiddenId" value="{$hotelId}"/>
<div id="ajaxChange">
Nothing
</div>
{literal}
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script>
        $("#textbox1").val($("#hiddenId").val());
        var ajaxCall = function(){
        console.log("clicked!");
        $.ajax({
            type: "POST",
            url: "test1.php",
            data: {
                testdata: $("#hiddenId").val()
            },
            success: function(data,textStatus,jqXHR){
                console.log(data);
                //var myObject = jQuery.parseJSON(data);
                var myObject = data;
                //console.log(myObject);
                $("#ajaxChange").html(myObject/*myObject.propertyDetails*/);
            },
            error: function(jqXHR, textStatus, errorThrown){
                console.log(jqXHR);
                console.log(textStatus);
                console.log(errorThrown);
            } 
        });
    };
    </script>
{/literal}